inherited fmAgreement: TfmAgreement
  Left = 0
  Top = 146
  Width = 1281
  Height = 941
  Caption = #1044#1086#1075#1086#1074#1086#1088#1099
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited sbBottom: TStatusBar
    Top = 880
    Width = 1273
  end
  inherited Panel1: TPanel
    Width = 1273
    Height = 28
    Visible = False
    inherited BitBtn1: TBitBtn
      Left = 1103
      Top = 2
      Height = 26
    end
    inherited BitBtn2: TBitBtn
      Left = 1191
      Top = 2
      Height = 26
    end
  end
  object ToolBar3: TToolBar [2]
    Left = 0
    Top = 28
    Width = 1273
    AutoSize = True
    BorderWidth = 2
    EdgeInner = esNone
    EdgeOuter = esNone
    Images = DMInv.ilActive
    TabOrder = 2
    Transparent = True
    object tbagradd: TToolButton
      Left = 0
      Top = 2
      Hint = #1044#1086#1073#1072#1074#1080#1090#1100
      ImageIndex = 30
      ParentShowHint = False
      ShowHint = True
      OnClick = tbagraddClick
    end
    object tbAgrDel: TToolButton
      Left = 23
      Top = 2
      Hint = #1059#1076#1072#1083#1080#1090#1100
      ImageIndex = 29
      ParentShowHint = False
      ShowHint = True
      OnClick = tbAgrDelClick
    end
    object tbagredit: TToolButton
      Left = 46
      Top = 2
      Hint = #1048#1079#1084#1077#1085#1080#1090#1100
      ImageIndex = 2
      ParentShowHint = False
      ShowHint = True
      OnClick = tbagreditClick
    end
  end
  object dbgAgr: TcxGrid [3]
    Left = 0
    Top = 60
    Width = 1273
    Height = 221
    Align = alTop
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -13
    Font.Name = 'Tahoma'
    Font.Style = []
    ParentFont = False
    TabOrder = 3
    LookAndFeel.Kind = lfStandard
    object dbgAgrDBTableView1: TcxGridDBTableView
      OnKeyDown = dbgAgrDBTableView1KeyDown
      NavigatorButtons.ConfirmDelete = False
      DataController.DataSource = dsAgr
      DataController.Summary.DefaultGroupSummaryItems = <>
      DataController.Summary.FooterSummaryItems = <>
      DataController.Summary.SummaryGroups = <>
      OptionsCustomize.ColumnFiltering = False
      OptionsData.CancelOnExit = False
      OptionsData.Deleting = False
      OptionsData.DeletingConfirmation = False
      OptionsData.Editing = False
      OptionsData.Inserting = False
      OptionsView.NoDataToDisplayInfoText = '<'#1053#1077#1090' '#1076#1072#1085#1085#1099#1093'>'
      OptionsView.CellAutoHeight = True
      OptionsView.ColumnAutoWidth = True
      OptionsView.GroupByBox = False
      Preview.Visible = True
      object dbgAgrDBTableView1Column1: TcxGridDBColumn
        Caption = #8470
        OnGetDataText = dbgAgrDBTableView1Column1GetDataText
        Options.Sorting = False
        Width = 26
      end
      object dbgAgrDBTableView1P_RECIPIENT: TcxGridDBColumn
        Caption = #1055#1086#1083#1091#1095'. '#1091#1089#1083#1091#1075
        DataBinding.FieldName = 'P_RECIPIENT'
        Width = 256
      end
      object dbgAgrDBTableView1AGNUM_N: TcxGridDBColumn
        Caption = #1053#1086#1084#1077#1088
        DataBinding.FieldName = 'AGNUM_N'
        Width = 101
      end
      object dbgAgrDBTableView1AGNUM: TcxGridDBColumn
        Caption = #8470' '#1085#1072' '#1076#1086#1082'.'
        DataBinding.FieldName = 'AGNUM'
        Width = 79
      end
      object dbgAgrDBTableView1LIST: TcxGridDBColumn
        Caption = #1055#1086#1076#1087#1080#1089#1072#1085#1090#1099
        DataBinding.FieldName = 'LIST'
        Width = 737
      end
      object dbgAgrDBTableView1ISSCAN: TcxGridDBColumn
        Caption = #1050#1086#1087#1080#1103
        DataBinding.FieldName = 'ISSCAN'
        PropertiesClassName = 'TcxCheckBoxProperties'
        Properties.ReadOnly = True
        Properties.ValueChecked = 1
        Properties.ValueUnchecked = 0
        Width = 70
      end
    end
    object cxGridLevel3: TcxGridLevel
      GridView = dbgAgrDBTableView1
    end
  end
  object dbgSC: TcxGrid [4]
    Left = 3
    Top = 519
    Width = 275
    Height = 163
    Align = alCustom
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -13
    Font.Name = 'Tahoma'
    Font.Style = []
    ParentFont = False
    TabOrder = 4
    LookAndFeel.Kind = lfStandard
    object cxGridDBTableView4: TcxGridDBTableView
      NavigatorButtons.ConfirmDelete = False
      NavigatorButtons.First.Visible = True
      NavigatorButtons.PriorPage.Visible = True
      NavigatorButtons.Prior.Visible = True
      NavigatorButtons.Next.Visible = True
      NavigatorButtons.NextPage.Visible = True
      NavigatorButtons.Last.Visible = True
      NavigatorButtons.Insert.Visible = False
      NavigatorButtons.Append.Visible = False
      NavigatorButtons.Delete.Visible = False
      NavigatorButtons.Edit.Visible = False
      NavigatorButtons.Post.Visible = False
      NavigatorButtons.Cancel.Visible = False
      NavigatorButtons.Refresh.Visible = False
      NavigatorButtons.SaveBookmark.Visible = False
      NavigatorButtons.GotoBookmark.Visible = False
      NavigatorButtons.Filter.Visible = False
      DataController.DataSource = dsSpecCond
      DataController.Summary.DefaultGroupSummaryItems = <>
      DataController.Summary.FooterSummaryItems = <>
      DataController.Summary.SummaryGroups = <>
      OptionsBehavior.CellHints = True
      OptionsBehavior.ImmediateEditor = False
      OptionsBehavior.IncSearch = True
      OptionsCustomize.ColumnFiltering = False
      OptionsData.CancelOnExit = False
      OptionsData.Deleting = False
      OptionsData.DeletingConfirmation = False
      OptionsData.Editing = False
      OptionsData.Inserting = False
      OptionsView.NavigatorOffset = 10
      OptionsView.NoDataToDisplayInfoText = '<'#1053#1077#1090' '#1076#1072#1085#1085#1099#1093'>'
      OptionsView.CellAutoHeight = True
      OptionsView.ColumnAutoWidth = True
      OptionsView.GroupByBox = False
      OptionsView.Indicator = True
      OptionsView.ShowColumnFilterButtons = sfbAlways
      Preview.Visible = True
      Styles.IncSearch = DMInv.cxKrasniyText
      Styles.Selection = DMInv.cxJoltiyFon
      Styles.Header = DMInv.cxSiniyText
      object cxGridDBTableView4SCNUM_N: TcxGridDBColumn
        Caption = #1053#1086#1084#1077#1088
        DataBinding.FieldName = 'SCNUM_N'
        Width = 184
      end
      object cxGridDBTableView4ISSCAN: TcxGridDBColumn
        Caption = #1050#1086#1087#1080#1103
        DataBinding.FieldName = 'ISSCAN'
        PropertiesClassName = 'TcxCheckBoxProperties'
        Properties.ReadOnly = True
        Properties.ValueChecked = 1
        Properties.ValueUnchecked = 0
        Width = 75
      end
    end
    object cxGridLevel4: TcxGridLevel
      GridView = cxGridDBTableView4
    end
  end
  object dbgS: TcxGrid [5]
    Left = 8
    Top = 718
    Width = 270
    Height = 157
    Align = alCustom
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -13
    Font.Name = 'Tahoma'
    Font.Style = []
    ParentFont = False
    TabOrder = 5
    LookAndFeel.Kind = lfStandard
    object cxGridDBTableViewS: TcxGridDBTableView
      NavigatorButtons.ConfirmDelete = False
      NavigatorButtons.First.Visible = True
      NavigatorButtons.PriorPage.Visible = True
      NavigatorButtons.Prior.Visible = True
      NavigatorButtons.Next.Visible = True
      NavigatorButtons.NextPage.Visible = True
      NavigatorButtons.Last.Visible = True
      NavigatorButtons.Insert.Visible = False
      NavigatorButtons.Append.Visible = False
      NavigatorButtons.Delete.Visible = False
      NavigatorButtons.Edit.Visible = False
      NavigatorButtons.Post.Visible = False
      NavigatorButtons.Cancel.Visible = False
      NavigatorButtons.Refresh.Visible = False
      NavigatorButtons.SaveBookmark.Visible = False
      NavigatorButtons.GotoBookmark.Visible = False
      NavigatorButtons.Filter.Visible = False
      DataController.DataSource = dsServices
      DataController.Summary.DefaultGroupSummaryItems = <>
      DataController.Summary.FooterSummaryItems = <>
      DataController.Summary.SummaryGroups = <>
      OptionsBehavior.CellHints = True
      OptionsBehavior.ImmediateEditor = False
      OptionsBehavior.IncSearch = True
      OptionsCustomize.ColumnFiltering = False
      OptionsData.CancelOnExit = False
      OptionsData.Deleting = False
      OptionsData.DeletingConfirmation = False
      OptionsData.Editing = False
      OptionsData.Inserting = False
      OptionsView.NavigatorOffset = 10
      OptionsView.NoDataToDisplayInfoText = '<'#1053#1077#1090' '#1076#1072#1085#1085#1099#1093'>'
      OptionsView.CellAutoHeight = True
      OptionsView.ColumnAutoWidth = True
      OptionsView.GroupByBox = False
      OptionsView.Indicator = True
      OptionsView.ShowColumnFilterButtons = sfbAlways
      Preview.Visible = True
      Styles.IncSearch = DMInv.cxKrasniyText
      Styles.Selection = DMInv.cxJoltiyFon
      Styles.Header = DMInv.cxSiniyText
      object cxGridDBTableViewSSTNAME: TcxGridDBColumn
        DataBinding.FieldName = 'STNAME'
      end
    end
    object cxGridLevel2: TcxGridLevel
      GridView = cxGridDBTableViewS
    end
  end
  object GroupBox1: TGroupBox [6]
    Left = 0
    Top = 281
    Width = 1273
    Height = 192
    Align = alTop
    Caption = #1044#1086#1075#1086#1074#1086#1088
    Color = clActiveBorder
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clGray
    Font.Height = -11
    Font.Name = 'Tahoma'
    Font.Style = []
    ParentBackground = False
    ParentColor = False
    ParentFont = False
    TabOrder = 6
    object Label1: TLabel
      Left = 7
      Top = 18
      Width = 83
      Height = 13
      Caption = #1060#1086#1088#1084#1072' '#1076#1086#1075#1086#1074#1086#1088#1072
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -11
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label18: TLabel
      Left = 303
      Top = 11
      Width = 92
      Height = 13
      Caption = #1055#1086#1083#1091#1095#1072#1090#1077#1083#1100' '#1091#1089#1083#1091#1075
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -11
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label17: TLabel
      Left = 7
      Top = 64
      Width = 63
      Height = 13
      Caption = #1055#1086#1076#1087#1080#1089#1072#1085#1090#1099
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -11
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label4: TLabel
      Left = 304
      Top = 61
      Width = 89
      Height = 13
      Caption = #1044#1072#1090#1072' '#1087#1086#1076#1087#1080#1089#1072#1085#1080#1103
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -11
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label8: TLabel
      Left = 520
      Top = 61
      Width = 90
      Height = 13
      Caption = #1044#1072#1090#1072' '#1079#1072#1074#1077#1088#1096#1077#1085#1080#1103
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -11
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label5: TLabel
      Left = 182
      Top = -16
      Width = 127
      Height = 13
      Align = alCustom
      Caption = #1050#1086#1084#1084#1077#1085#1090#1072#1088#1080#1081' '#1082' '#1076#1086#1075#1086#1074#1086#1088#1091
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clNavy
      Font.Height = -11
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label9: TLabel
      Left = 1046
      Top = 10
      Width = 154
      Height = 13
      Caption = #1044#1072#1090#1072' '#1087#1088#1077#1078#1076#1077#1074#1088'. '#1088#1072#1089#1090#1086#1088#1078#1077#1085#1080#1103
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -11
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label15: TLabel
      Left = 1046
      Top = 62
      Width = 113
      Height = 13
      Align = alCustom
      Caption = #1055#1088#1080#1095#1080#1085#1072' '#1088#1072#1089#1090#1086#1088#1078#1077#1085#1080#1103
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -11
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label7: TLabel
      Left = 692
      Top = 123
      Width = 80
      Height = 13
      Caption = #1044#1072#1090#1072' '#1088#1086#1078#1076#1077#1085#1080#1103
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -11
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label26: TLabel
      Left = 692
      Top = 12
      Width = 127
      Height = 13
      Caption = #1050#1086#1084#1084#1077#1085#1090#1072#1088#1080#1081' '#1082' '#1076#1086#1075#1086#1074#1086#1088#1091
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -11
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object edFORMA: TDBEdit
      Left = 7
      Top = 32
      Width = 126
      Height = 27
      TabStop = False
      DataField = 'FORMA'
      DataSource = dsAgr
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -16
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
      ReadOnly = True
      TabOrder = 0
    end
    object edP_RECIPIENT: TDBEdit
      Left = 303
      Top = 26
      Width = 369
      Height = 27
      TabStop = False
      DataField = 'P_RECIPIENT'
      DataSource = dsAgr
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -16
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
      ReadOnly = True
      TabOrder = 1
    end
    object edAGDATE: TcxDBDateEdit
      Left = 304
      Top = 82
      TabStop = False
      DataBinding.DataField = 'AGDATE'
      DataBinding.DataSource = dsAgr
      ParentFont = False
      Properties.ReadOnly = True
      Style.Font.Charset = DEFAULT_CHARSET
      Style.Font.Color = clWindowText
      Style.Font.Height = -16
      Style.Font.Name = 'Tahoma'
      Style.Font.Style = [fsBold]
      Style.IsFontAssigned = True
      TabOrder = 2
      Width = 121
    end
    object edAGDATEEND: TcxDBDateEdit
      Left = 520
      Top = 82
      TabStop = False
      DataBinding.DataField = 'AGDATEEND'
      DataBinding.DataSource = dsAgr
      ParentFont = False
      Properties.ReadOnly = True
      Style.Font.Charset = DEFAULT_CHARSET
      Style.Font.Color = clWindowText
      Style.Font.Height = -16
      Style.Font.Name = 'Tahoma'
      Style.Font.Style = [fsBold]
      Style.IsFontAssigned = True
      TabOrder = 3
      Width = 121
    end
    object mdAGNOTE: TDBMemo
      Left = 692
      Top = 31
      Width = 339
      Height = 74
      TabStop = False
      Align = alCustom
      DataField = 'AGNOTE'
      DataSource = dsAgr
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
      ReadOnly = True
      TabOrder = 4
    end
    object edDATECLOSE: TcxDBDateEdit
      Left = 1046
      Top = 29
      TabStop = False
      DataBinding.DataField = 'AGDATECLOSE'
      DataBinding.DataSource = dsAgr
      ParentFont = False
      Properties.ReadOnly = True
      Style.Font.Charset = DEFAULT_CHARSET
      Style.Font.Color = clWindowText
      Style.Font.Height = -16
      Style.Font.Name = 'Tahoma'
      Style.Font.Style = [fsBold]
      Style.IsFontAssigned = True
      TabOrder = 5
      Width = 137
    end
    object mdAGNOTECLOSE: TDBMemo
      Left = 1046
      Top = 78
      Width = 232
      Height = 107
      TabStop = False
      Align = alCustom
      DataField = 'AGNOTECLOSE'
      DataSource = dsAgr
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
      ReadOnly = True
      TabOrder = 6
    end
    object edPDATEBIRTH1: TDBEdit
      Left = 692
      Top = 137
      Width = 126
      Height = 27
      TabStop = False
      DataField = 'PDATEBIRTH'
      DataSource = dsAgr
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -16
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
      ReadOnly = True
      TabOrder = 7
    end
    object DBMemo1: TDBMemo
      Left = 6
      Top = 79
      Width = 275
      Height = 106
      TabStop = False
      Align = alCustom
      DataField = 'LIST'
      DataSource = dsAgr
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
      ReadOnly = True
      TabOrder = 8
    end
    object rgPodr: TcxDBRadioGroup
      Left = 304
      Top = 126
      Caption = #1055#1086#1076#1088#1072#1079#1076#1077#1083#1077#1085#1080#1077
      DataBinding.DataField = 'AGPODRTYPE'
      DataBinding.DataSource = dsAgr
      ParentFont = False
      Properties.Columns = 5
      Properties.Items = <
        item
          Caption = #1044'/'#1089
          Value = 0
        end
        item
          Caption = #1053#1072#1095'. '#1075#1080#1084#1085'.'
          Value = 1
        end
        item
          Caption = #1057#1088#1077#1076#1085'. '#1096#1082'.'
          Value = 2
        end
        item
          Caption = #1057#1090#1072#1088#1096'. '#1096#1082'.'
          Value = 3
        end
        item
          Caption = #1051#1072#1075#1077#1088#1100
          Value = 4
        end>
      Properties.ReadOnly = True
      Style.Font.Charset = DEFAULT_CHARSET
      Style.Font.Color = clWindowText
      Style.Font.Height = -11
      Style.Font.Name = 'Tahoma'
      Style.Font.Style = []
      Style.IsFontAssigned = True
      TabOrder = 9
      Height = 49
      Width = 369
    end
  end
  object GroupBox2: TGroupBox [7]
    Left = 284
    Top = 489
    Width = 984
    Height = 193
    Caption = #1044#1086#1087#1086#1083#1085#1080#1090#1077#1083#1100#1085#1086#1077' '#1089#1086#1075#1083#1072#1096#1077#1085#1080#1077
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clGray
    Font.Height = -11
    Font.Name = 'Tahoma'
    Font.Style = []
    ParentFont = False
    TabOrder = 7
    object Label16: TLabel
      Left = 10
      Top = 18
      Width = 141
      Height = 13
      Caption = #8470' '#1076#1086#1087'. '#1089#1086#1075#1083'. '#1085#1072' '#1076#1086#1082#1091#1084#1077#1085#1090#1077
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -11
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label21: TLabel
      Left = 8
      Top = 74
      Width = 65
      Height = 13
      Caption = #1044#1072#1090#1072' '#1085#1072#1095#1072#1083#1072
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -11
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label22: TLabel
      Left = 8
      Top = 130
      Width = 90
      Height = 13
      Caption = #1044#1072#1090#1072' '#1079#1072#1074#1077#1088#1096#1077#1085#1080#1103
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -11
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label23: TLabel
      Left = 168
      Top = 99
      Width = 67
      Height = 13
      Align = alCustom
      Caption = #1050#1086#1084#1084#1077#1085#1090#1072#1088#1080#1081
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -11
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object edSCNUMBER: TDBEdit
      Left = 8
      Top = 36
      Width = 141
      Height = 27
      TabStop = False
      DataField = 'SCNUMBER'
      DataSource = dsSpecCond
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -16
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
      ReadOnly = True
      TabOrder = 0
    end
    object edSCDATE: TcxDBDateEdit
      Left = 8
      Top = 92
      TabStop = False
      DataBinding.DataField = 'SCDATE'
      DataBinding.DataSource = dsSpecCond
      ParentFont = False
      Properties.ReadOnly = True
      Style.Font.Charset = DEFAULT_CHARSET
      Style.Font.Color = clWindowText
      Style.Font.Height = -16
      Style.Font.Name = 'Tahoma'
      Style.Font.Style = [fsBold]
      Style.IsFontAssigned = True
      TabOrder = 1
      Width = 121
    end
    object edSCDATEEND: TcxDBDateEdit
      Left = 8
      Top = 148
      TabStop = False
      DataBinding.DataField = 'SCDATEEND'
      DataBinding.DataSource = dsSpecCond
      ParentFont = False
      Properties.ReadOnly = True
      Style.Font.Charset = DEFAULT_CHARSET
      Style.Font.Color = clWindowText
      Style.Font.Height = -16
      Style.Font.Name = 'Tahoma'
      Style.Font.Style = [fsBold]
      Style.IsFontAssigned = True
      TabOrder = 2
      Width = 121
    end
    object mdSCNOTE: TDBMemo
      Left = 168
      Top = 118
      Width = 369
      Height = 59
      TabStop = False
      Align = alCustom
      DataField = 'SCNOTE'
      DataSource = dsSpecCond
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
      ReadOnly = True
      TabOrder = 3
    end
  end
  object GroupBox3: TGroupBox [8]
    Left = 284
    Top = 686
    Width = 984
    Height = 193
    Caption = #1059#1089#1083#1091#1075#1072
    Color = clActiveBorder
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clGray
    Font.Height = -11
    Font.Name = 'Tahoma'
    Font.Style = []
    ParentBackground = False
    ParentColor = False
    ParentFont = False
    TabOrder = 8
    object Label24: TLabel
      Left = 8
      Top = 35
      Width = 60
      Height = 13
      Caption = #1050#1086#1083#1080#1095#1077#1089#1090#1074#1086
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -11
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object Label25: TLabel
      Left = 8
      Top = 91
      Width = 67
      Height = 13
      Align = alCustom
      Caption = #1050#1086#1084#1084#1077#1085#1090#1072#1088#1080#1081
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clGray
      Font.Height = -11
      Font.Name = 'Tahoma'
      Font.Style = []
      ParentFont = False
    end
    object edSCOUNT: TcxDBMaskEdit
      Left = 8
      Top = 54
      TabStop = False
      DataBinding.DataField = 'SCOUNT'
      DataBinding.DataSource = dsServices
      ParentFont = False
      Properties.MaskKind = emkRegExpr
      Properties.EditMask = '\d+'
      Properties.MaxLength = 0
      Properties.ReadOnly = True
      Style.BorderStyle = ebs3D
      Style.Font.Charset = DEFAULT_CHARSET
      Style.Font.Color = clWindowText
      Style.Font.Height = -16
      Style.Font.Name = 'Tahoma'
      Style.Font.Style = [fsBold]
      Style.IsFontAssigned = True
      TabOrder = 0
      Width = 95
    end
    object mdSTNOTE: TDBMemo
      Left = 8
      Top = 110
      Width = 369
      Height = 51
      TabStop = False
      Align = alCustom
      DataField = 'SNOTE'
      DataSource = dsServices
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlack
      Font.Height = -13
      Font.Name = 'Tahoma'
      Font.Style = [fsBold]
      ParentFont = False
      ReadOnly = True
      TabOrder = 1
    end
  end
  object ToolBar4: TToolBar [9]
    Left = 5
    Top = 479
    Width = 276
    Height = 35
    Align = alCustom
    AutoSize = True
    BorderWidth = 2
    ButtonHeight = 23
    EdgeInner = esNone
    EdgeOuter = esNone
    Images = DMInv.ilActive
    TabOrder = 9
    Transparent = True
    Visible = False
    object tbscadd: TToolButton
      Left = 0
      Top = 2
      Hint = #1044#1086#1073#1072#1074#1080#1090#1100
      ImageIndex = 30
      ParentShowHint = False
      ShowHint = True
      OnClick = tbscaddClick
    end
    object tbScDel: TToolButton
      Left = 23
      Top = 2
      Hint = #1059#1076#1072#1083#1080#1090#1100
      ImageIndex = 29
      ParentShowHint = False
      ShowHint = True
      OnClick = tbScDelClick
    end
    object tbscedit: TToolButton
      Left = 46
      Top = 2
      Hint = #1048#1079#1084#1077#1085#1080#1090#1100
      ImageIndex = 2
      ParentShowHint = False
      ShowHint = True
      OnClick = tbsceditClick
    end
  end
  object dsAgr: TDataSource
    DataSet = qAgr
    Left = 960
    Top = 544
  end
  object qAgr: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterOpen = qAgrAfterOpen
    BeforePost = qAgrBeforePost
    CachedUpdates = True
    SQL.Strings = (
      
        'SELECT A.*, (P_res.PLASTNAME||'#39' '#39'||P_res.PNAME||'#39' '#39'||COALESCE(P_' +
        'res.PPATRONYMIC,'#39' '#39')) AS P_RECIPIENT,'
      '     IIF (S.AGID IS NULL, 0, 1) AS ISSCAN, P_res.PDATEBIRTH,'
      '     SD.SDNAME AS FORMA,'
      
        '     LIST(DISTINCT (P.PLASTNAME||'#39' '#39'||P.PNAME||'#39' '#39'||COALESCE(P.P' +
        'PATRONYMIC,'#39' '#39')), '#39', '#39')'
      'FROM AGREEMENTS A'
      'INNER JOIN AGR_POLUCH_USLUG APU ON APU.AGID = A.AGID'
      'INNER JOIN PEOPLE P_res ON P_res.PID = APU.PID'
      'INNER JOIN AGR_PODPISANT AP ON AP.AGID = A.AGID'
      'INNER JOIN PEOPLE P ON P.PID = AP.PID'
      'INNER JOIN SYS_DIC SD ON SD.SDID = A.AGFORMTYPE'
      'LEFT OUTER JOIN A_SCAN S ON S.AGID = A.AGID'
      'WHERE a.AGISDELETE IS NULL '
      
        'GROUP BY 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,2' +
        '2'
      'order by A.AGID')
    UpdateObject = quAgr
    GeneratorField.Field = 'AGID'
    GeneratorField.Generator = 'GEN_AGREEMENTS'
    Left = 992
    Top = 544
    object qAgrAGID: TIntegerField
      FieldName = 'AGID'
      Origin = '"AGREEMENTS"."AGID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qAgrAGNUM_N: TIntegerField
      FieldName = 'AGNUM_N'
      Origin = '"AGREEMENTS"."AGNUM_N"'
    end
    object qAgrAGNUM: TIBStringField
      FieldName = 'AGNUM'
      Origin = '"AGREEMENTS"."AGNUM"'
      Size = 40
    end
    object qAgrAGDATE: TDateField
      FieldName = 'AGDATE'
      Origin = '"AGREEMENTS"."AGDATE"'
    end
    object qAgrAGDATEEND: TDateField
      FieldName = 'AGDATEEND'
      Origin = '"AGREEMENTS"."AGDATEEND"'
    end
    object qAgrAGFORMTYPE: TIntegerField
      FieldName = 'AGFORMTYPE'
      Origin = '"AGREEMENTS"."AGFORMTYPE"'
    end
    object qAgrAGNOTE: TIBStringField
      FieldName = 'AGNOTE'
      Origin = '"AGREEMENTS"."AGNOTE"'
      Size = 255
    end
    object qAgrAGDATECLOSE: TDateField
      FieldName = 'AGDATECLOSE'
      Origin = '"AGREEMENTS"."AGDATECLOSE"'
    end
    object qAgrAGNOTECLOSE: TIBStringField
      FieldName = 'AGNOTECLOSE'
      Origin = '"AGREEMENTS"."AGNOTECLOSE"'
      Size = 255
    end
    object qAgrAGUSERENTER: TIBStringField
      FieldName = 'AGUSERENTER'
      Origin = '"AGREEMENTS"."AGUSERENTER"'
      Size = 40
    end
    object qAgrAGTIMEENTER: TDateTimeField
      FieldName = 'AGTIMEENTER'
      Origin = '"AGREEMENTS"."AGTIMEENTER"'
    end
    object qAgrAGUSEREDIT: TIBStringField
      FieldName = 'AGUSEREDIT'
      Origin = '"AGREEMENTS"."AGUSEREDIT"'
      Size = 40
    end
    object qAgrAGTIMEEDIT: TDateTimeField
      FieldName = 'AGTIMEEDIT'
      Origin = '"AGREEMENTS"."AGTIMEEDIT"'
    end
    object qAgrAGISDELETE: TIntegerField
      FieldName = 'AGISDELETE'
      Origin = '"AGREEMENTS"."AGISDELETE"'
    end
    object qAgrP_RECIPIENT: TIBStringField
      FieldName = 'P_RECIPIENT'
      ProviderFlags = []
      Size = 767
    end
    object qAgrISSCAN: TIntegerField
      FieldName = 'ISSCAN'
      ProviderFlags = []
    end
    object qAgrPDATEBIRTH: TDateField
      FieldName = 'PDATEBIRTH'
      Origin = '"PEOPLE"."PDATEBIRTH"'
    end
    object qAgrFORMA: TIBStringField
      FieldName = 'FORMA'
      ProviderFlags = []
      Size = 255
    end
    object qAgrLIST: TMemoField
      FieldName = 'LIST'
      ProviderFlags = []
      BlobType = ftMemo
      Size = 8
    end
    object qAgrAGUSERREGISTER: TIBStringField
      FieldName = 'AGUSERREGISTER'
      Origin = '"AGREEMENTS"."AGUSERREGISTER"'
      Size = 40
    end
    object qAgrAGDATEREGISTER: TDateTimeField
      FieldName = 'AGDATEREGISTER'
      Origin = '"AGREEMENTS"."AGDATEREGISTER"'
    end
    object qAgrAGISNEEDRESIGN: TIntegerField
      FieldName = 'AGISNEEDRESIGN'
      Origin = '"AGREEMENTS"."AGISNEEDRESIGN"'
    end
    object qAgrAGPODRTYPE: TIntegerField
      FieldName = 'AGPODRTYPE'
      Origin = '"AGREEMENTS"."AGPODRTYPE"'
    end
  end
  object quAgr: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  AGID,'
      '  AGNUM_N,'
      '  AGNUM,'
      '  AGUSERREGISTER,'
      '  AGDATEREGISTER,'
      '  AGDATE,'
      '  AGDATEEND,'
      '  AGFORMTYPE,'
      '  AGNOTE,'
      '  AGDATECLOSE,'
      '  AGNOTECLOSE,'
      '  AGISNEEDRESIGN,'
      '  AGPODRTYPE,'
      '  AGISDELETE,'
      '  AGUSERENTER,'
      '  AGTIMEENTER,'
      '  AGUSEREDIT,'
      '  AGTIMEEDIT,'
      '  P_RECIPIENT,'
      '  ISSCAN,'
      '  PDATEBIRTH,'
      '  FORMA,'
      '  LIST'
      'from AGREEMENTS '
      'where'
      '  AGID = :AGID')
    ModifySQL.Strings = (
      'update AGREEMENTS'
      'set'
      '  AGDATE = :AGDATE,'
      '  AGDATECLOSE = :AGDATECLOSE,'
      '  AGDATEEND = :AGDATEEND,'
      '  AGDATEREGISTER = :AGDATEREGISTER,'
      '  AGFORMTYPE = :AGFORMTYPE,'
      '  AGID = :AGID,'
      '  AGISDELETE = :AGISDELETE,'
      '  AGISNEEDRESIGN = :AGISNEEDRESIGN,'
      '  AGNOTE = :AGNOTE,'
      '  AGNOTECLOSE = :AGNOTECLOSE,'
      '  AGNUM = :AGNUM,'
      '  AGNUM_N = :AGNUM_N,'
      '  AGPODRTYPE = :AGPODRTYPE,'
      '  AGTIMEEDIT = :AGTIMEEDIT,'
      '  AGTIMEENTER = :AGTIMEENTER,'
      '  AGUSEREDIT = :AGUSEREDIT,'
      '  AGUSERENTER = :AGUSERENTER,'
      '  AGUSERREGISTER = :AGUSERREGISTER'
      'where'
      '  AGID = :OLD_AGID')
    InsertSQL.Strings = (
      'insert into AGREEMENTS'
      
        '  (AGDATE, AGDATECLOSE, AGDATEEND, AGDATEREGISTER, AGFORMTYPE, A' +
        'GID, AGISDELETE, '
      
        '   AGISNEEDRESIGN, AGNOTE, AGNOTECLOSE, AGNUM, AGNUM_N, AGPODRTY' +
        'PE, AGTIMEEDIT, '
      '   AGTIMEENTER, AGUSEREDIT, AGUSERENTER, AGUSERREGISTER)'
      'values'
      
        '  (:AGDATE, :AGDATECLOSE, :AGDATEEND, :AGDATEREGISTER, :AGFORMTY' +
        'PE, :AGID, '
      
        '   :AGISDELETE, :AGISNEEDRESIGN, :AGNOTE, :AGNOTECLOSE, :AGNUM, ' +
        ':AGNUM_N, '
      
        '   :AGPODRTYPE, :AGTIMEEDIT, :AGTIMEENTER, :AGUSEREDIT, :AGUSERE' +
        'NTER, :AGUSERREGISTER)')
    DeleteSQL.Strings = (
      'update AGREEMENTS'
      'set'
      '  AGISDELETE = 1'
      'where'
      '  AGID = :OLD_AGID')
    Left = 1035
    Top = 544
  end
  object qChekNumAgr: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'SELECT COUNT(AG.AGID) AS AGNUM_N'
      'FROM AGREEMENTS AG'
      'WHERE CAST(AG.AGTIMEENTER AS DATE) = CURRENT_DATE')
    Left = 1067
    Top = 544
    object qChekNumAgrAGNUM_N: TIntegerField
      FieldName = 'AGNUM_N'
      ProviderFlags = []
    end
  end
  object qA_Scan: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    CachedUpdates = True
    DataSource = dsAgr
    SQL.Strings = (
      'SELECT S.*'
      'FROM A_SCAN S'
      'WHERE S.AGID = :AGID')
    UpdateObject = quA_Scan
    GeneratorField.Field = 'ASID'
    GeneratorField.Generator = 'GEN_A_SCAN'
    Left = 1099
    Top = 544
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'AGID'
        ParamType = ptUnknown
      end>
    object qA_ScanASID: TIntegerField
      FieldName = 'ASID'
      Origin = '"A_SCAN"."ASID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qA_ScanAGID: TIntegerField
      FieldName = 'AGID'
      Origin = '"A_SCAN"."AGID"'
      Required = True
    end
    object qA_ScanASIMAGE: TBlobField
      FieldName = 'ASIMAGE'
      Origin = '"A_SCAN"."ASIMAGE"'
      ProviderFlags = [pfInUpdate]
      Size = 8
    end
    object qA_ScanASNOTE: TIBStringField
      FieldName = 'ASNOTE'
      Origin = '"A_SCAN"."ASNOTE"'
      Size = 255
    end
    object qA_ScanASUSERENTER: TIBStringField
      FieldName = 'ASUSERENTER'
      Origin = '"A_SCAN"."ASUSERENTER"'
      Size = 40
    end
    object qA_ScanASTIMEENTER: TDateTimeField
      FieldName = 'ASTIMEENTER'
      Origin = '"A_SCAN"."ASTIMEENTER"'
    end
    object qA_ScanASUSEREDIT: TIBStringField
      FieldName = 'ASUSEREDIT'
      Origin = '"A_SCAN"."ASUSEREDIT"'
      Size = 40
    end
    object qA_ScanASTIMEEDIT: TDateTimeField
      FieldName = 'ASTIMEEDIT'
      Origin = '"A_SCAN"."ASTIMEEDIT"'
    end
  end
  object quA_Scan: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  ASID,'
      '  AGID,'
      '  ASIMAGE,'
      '  ASNOTE,'
      '  ASUSERENTER,'
      '  ASTIMEENTER,'
      '  ASUSEREDIT,'
      '  ASTIMEEDIT'
      'from A_SCAN '
      'where'
      '  ASID = :ASID')
    ModifySQL.Strings = (
      'update A_SCAN'
      'set'
      '  AGID = :AGID,'
      '  ASID = :ASID,'
      '  ASIMAGE = :ASIMAGE,'
      '  ASNOTE = :ASNOTE,'
      '  ASTIMEEDIT = :ASTIMEEDIT,'
      '  ASTIMEENTER = :ASTIMEENTER,'
      '  ASUSEREDIT = :ASUSEREDIT,'
      '  ASUSERENTER = :ASUSERENTER'
      'where'
      '  ASID = :OLD_ASID')
    InsertSQL.Strings = (
      'insert into A_SCAN'
      
        '  (AGID, ASID, ASIMAGE, ASNOTE, ASTIMEEDIT, ASTIMEENTER, ASUSERE' +
        'DIT, ASUSERENTER)'
      'values'
      
        '  (:AGID, :ASID, :ASIMAGE, :ASNOTE, :ASTIMEEDIT, :ASTIMEENTER, :' +
        'ASUSEREDIT, '
      '   :ASUSERENTER)')
    DeleteSQL.Strings = (
      'delete from A_SCAN'
      'where'
      '  ASID = :OLD_ASID')
    Left = 1131
    Top = 544
  end
  object qChekSCNum: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    DataSource = dsAgr
    SQL.Strings = (
      'SELECT COUNT(SC.SCID) AS SCNUM_N'
      'FROM SPEC_COND SC'
      'WHERE SC.AGID = :AGID'
      '    AND SC.SCISDELETE IS NULL')
    Left = 1067
    Top = 576
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'AGID'
        ParamType = ptUnknown
      end>
    object qChekSCNumSCNUM_N: TIntegerField
      FieldName = 'SCNUM_N'
      ProviderFlags = []
    end
  end
  object quSpecCond: TIBUpdateSQL
    RefreshSQL.Strings = (
      'Select '
      '  SCID,'
      '  SCNUM_N,'
      '  AGID,'
      '  SCNUMBER,'
      '  SCDATEREGISTER,'
      '  SCUSERREGISTER,'
      '  SCDATE,'
      '  SCDATEEND,'
      '  SCBALANCE,'
      '  SCNOTE,'
      '  SCDISCOUNT,'
      '  SCTYPEOFDISCOUNT,'
      '  SCISDELETE,'
      '  SCISNEEDRESIGN,'
      '  SCUSERENTER,'
      '  SCTIMEENTER,'
      '  SCUSEREDIT,'
      '  SCTIMEEDIT,'
      '  SCDISCOUNTNOTE,'
      '  SCDISCOUNTAUTORISATION,'
      '  ISSCAN'
      'from SPEC_COND '
      'where'
      '  SCID = :SCID')
    ModifySQL.Strings = (
      'update SPEC_COND'
      'set'
      '  AGID = :AGID,'
      '  SCBALANCE = :SCBALANCE,'
      '  SCDATE = :SCDATE,'
      '  SCDATEEND = :SCDATEEND,'
      '  SCDATEREGISTER = :SCDATEREGISTER,'
      '  SCDISCOUNT = :SCDISCOUNT,'
      '  SCDISCOUNTAUTORISATION = :SCDISCOUNTAUTORISATION,'
      '  SCDISCOUNTNOTE = :SCDISCOUNTNOTE,'
      '  SCID = :SCID,'
      '  SCISDELETE = :SCISDELETE,'
      '  SCISNEEDRESIGN = :SCISNEEDRESIGN,'
      '  SCNOTE = :SCNOTE,'
      '  SCNUM_N = :SCNUM_N,'
      '  SCNUMBER = :SCNUMBER,'
      '  SCTIMEEDIT = :SCTIMEEDIT,'
      '  SCTIMEENTER = :SCTIMEENTER,'
      '  SCTYPEOFDISCOUNT = :SCTYPEOFDISCOUNT,'
      '  SCUSEREDIT = :SCUSEREDIT,'
      '  SCUSERENTER = :SCUSERENTER,'
      '  SCUSERREGISTER = :SCUSERREGISTER'
      'where'
      '  SCID = :OLD_SCID')
    InsertSQL.Strings = (
      'insert into SPEC_COND'
      
        '  (AGID, SCBALANCE, SCDATE, SCDATEEND, SCDATEREGISTER, SCDISCOUN' +
        'T, SCDISCOUNTAUTORISATION, '
      
        '   SCDISCOUNTNOTE, SCID, SCISDELETE, SCISNEEDRESIGN, SCNOTE, SCN' +
        'UM_N, SCNUMBER, '
      
        '   SCTIMEEDIT, SCTIMEENTER, SCTYPEOFDISCOUNT, SCUSEREDIT, SCUSER' +
        'ENTER, '
      '   SCUSERREGISTER)'
      'values'
      
        '  (:AGID, :SCBALANCE, :SCDATE, :SCDATEEND, :SCDATEREGISTER, :SCD' +
        'ISCOUNT, '
      
        '   :SCDISCOUNTAUTORISATION, :SCDISCOUNTNOTE, :SCID, :SCISDELETE,' +
        ' :SCISNEEDRESIGN, '
      
        '   :SCNOTE, :SCNUM_N, :SCNUMBER, :SCTIMEEDIT, :SCTIMEENTER, :SCT' +
        'YPEOFDISCOUNT, '
      '   :SCUSEREDIT, :SCUSERENTER, :SCUSERREGISTER)')
    DeleteSQL.Strings = (
      'update SPEC_COND'
      'set'
      '  SCISDELETE = 1'
      'where'
      '  SCID = :OLD_SCID')
    Left = 1035
    Top = 576
  end
  object qSpecCond: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qSpecCondAfterInsert
    BeforePost = qAgrBeforePost
    CachedUpdates = True
    DataSource = dsAgr
    SQL.Strings = (
      
        'SELECT SC.*, IIF (S.SCID IS NULL, 0, 1) AS ISSCAN, SD.SDNAME AS ' +
        'actualn'
      'FROM SPEC_COND SC'
      'LEFT OUTER JOIN SC_SCAN S ON S.SCID = SC.SCID'
      'LEFT OUTER JOIN SCACTUALN SCA ON SCA.SCID = SC.SCID'
      'LEFT OUTER JOIN SYS_DIC SD ON SD.SDID = SCA.SDID'
      'WHERE SC.AGID = :AGID'
      'AND SC.SCISDELETE IS NULL'
      'order by SC.SCNUM_N')
    UpdateObject = quSpecCond
    GeneratorField.Field = 'SCID'
    GeneratorField.Generator = 'GEN_SPEC_COND'
    Left = 992
    Top = 576
    ParamData = <
      item
        DataType = ftInteger
        Name = 'AGID'
        ParamType = ptUnknown
        Size = 4
      end>
    object qSpecCondSCID: TIntegerField
      FieldName = 'SCID'
      Origin = '"SPEC_COND"."SCID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qSpecCondSCNUM_N: TIntegerField
      FieldName = 'SCNUM_N'
      Origin = '"SPEC_COND"."SCNUM_N"'
    end
    object qSpecCondAGID: TIntegerField
      FieldName = 'AGID'
      Origin = '"SPEC_COND"."AGID"'
      Required = True
    end
    object qSpecCondSCNUMBER: TIBStringField
      FieldName = 'SCNUMBER'
      Origin = '"SPEC_COND"."SCNUMBER"'
      Size = 40
    end
    object qSpecCondSCDATE: TDateField
      FieldName = 'SCDATE'
      Origin = '"SPEC_COND"."SCDATE"'
    end
    object qSpecCondSCDATEEND: TDateField
      FieldName = 'SCDATEEND'
      Origin = '"SPEC_COND"."SCDATEEND"'
    end
    object qSpecCondSCBALANCE: TIBBCDField
      FieldName = 'SCBALANCE'
      Origin = '"SPEC_COND"."SCBALANCE"'
      Precision = 18
      Size = 2
    end
    object qSpecCondSCNOTE: TIBStringField
      FieldName = 'SCNOTE'
      Origin = '"SPEC_COND"."SCNOTE"'
      Size = 255
    end
    object qSpecCondSCUSERENTER: TIBStringField
      FieldName = 'SCUSERENTER'
      Origin = '"SPEC_COND"."SCUSERENTER"'
      Size = 40
    end
    object qSpecCondSCTIMEENTER: TDateTimeField
      FieldName = 'SCTIMEENTER'
      Origin = '"SPEC_COND"."SCTIMEENTER"'
    end
    object qSpecCondSCUSEREDIT: TIBStringField
      FieldName = 'SCUSEREDIT'
      Origin = '"SPEC_COND"."SCUSEREDIT"'
      Size = 40
    end
    object qSpecCondSCTIMEEDIT: TDateTimeField
      FieldName = 'SCTIMEEDIT'
      Origin = '"SPEC_COND"."SCTIMEEDIT"'
    end
    object qSpecCondSCISDELETE: TIntegerField
      FieldName = 'SCISDELETE'
      Origin = '"SPEC_COND"."SCISDELETE"'
    end
    object qSpecCondISSCAN: TIntegerField
      FieldName = 'ISSCAN'
      ProviderFlags = []
    end
    object qSpecCondSCDISCOUNTAUTORISATION: TIBStringField
      FieldName = 'SCDISCOUNTAUTORISATION'
      Origin = '"SPEC_COND"."SCDISCOUNTAUTORISATION"'
      Size = 40
    end
    object qSpecCondSCDATEREGISTER: TDateTimeField
      FieldName = 'SCDATEREGISTER'
      Origin = '"SPEC_COND"."SCDATEREGISTER"'
    end
    object qSpecCondSCUSERREGISTER: TIBStringField
      FieldName = 'SCUSERREGISTER'
      Origin = '"SPEC_COND"."SCUSERREGISTER"'
      Size = 40
    end
    object qSpecCondSCDISCOUNT: TIBBCDField
      FieldName = 'SCDISCOUNT'
      Origin = '"SPEC_COND"."SCDISCOUNT"'
      Precision = 18
      Size = 2
    end
    object qSpecCondSCTYPEOFDISCOUNT: TIntegerField
      FieldName = 'SCTYPEOFDISCOUNT'
      Origin = '"SPEC_COND"."SCTYPEOFDISCOUNT"'
    end
    object qSpecCondSCISNEEDRESIGN: TIntegerField
      FieldName = 'SCISNEEDRESIGN'
      Origin = '"SPEC_COND"."SCISNEEDRESIGN"'
    end
    object qSpecCondSCDISCOUNTNOTE: TIBStringField
      FieldName = 'SCDISCOUNTNOTE'
      Origin = '"SPEC_COND"."SCDISCOUNTNOTE"'
      Size = 255
    end
    object qSpecCondACTUALN: TIBStringField
      FieldName = 'ACTUALN'
      Origin = '"SYS_DIC"."SDNAME"'
      Size = 255
    end
  end
  object dsSpecCond: TDataSource
    DataSet = qSpecCond
    Left = 960
    Top = 576
  end
  object dsServices: TDataSource
    DataSet = qServices
    Left = 960
    Top = 608
  end
  object qServices: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    AfterInsert = qServicesAfterInsert
    BeforePost = qAgrBeforePost
    CachedUpdates = True
    DataSource = dsSpecCond
    SQL.Strings = (
      'SELECT S.*, ST.STNAME, ST.STTARIF, ST.STDATEBEGIN, ST.STDATEEND'
      'FROM SERVICES S'
      'INNER JOIN SERVICES_TYPE ST ON ST.STID = S.STID'
      'WHERE S.SISDELETE IS NULL'
      '    AND S.SCID = :SCID'
      'order by ST.STNAME')
    UpdateObject = quServices
    GeneratorField.Field = 'SID'
    GeneratorField.Generator = 'GEN_SERVICES'
    Left = 992
    Top = 608
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'SCID'
        ParamType = ptUnknown
      end>
    object qServicesSID: TIntegerField
      FieldName = 'SID'
      Origin = '"SERVICES"."SID"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object qServicesSCID: TIntegerField
      FieldName = 'SCID'
      Origin = '"SERVICES"."SCID"'
      Required = True
    end
    object qServicesSTID: TIntegerField
      FieldName = 'STID'
      Origin = '"SERVICES"."STID"'
      Required = True
    end
    object qServicesSCOUNT: TIntegerField
      DisplayLabel = #1050#1086#1083'-'#1074#1086
      FieldName = 'SCOUNT'
      Origin = '"SERVICES"."SCOUNT"'
    end
    object qServicesSNOTE: TIBStringField
      FieldName = 'SNOTE'
      Origin = '"SERVICES"."SNOTE"'
      Size = 255
    end
    object qServicesSUSERENTER: TIBStringField
      FieldName = 'SUSERENTER'
      Origin = '"SERVICES"."SUSERENTER"'
      Size = 40
    end
    object qServicesSTIMEENTER: TDateTimeField
      FieldName = 'STIMEENTER'
      Origin = '"SERVICES"."STIMEENTER"'
    end
    object qServicesSUSEREDIT: TIBStringField
      FieldName = 'SUSEREDIT'
      Origin = '"SERVICES"."SUSEREDIT"'
      Size = 40
    end
    object qServicesSTIMEEDIT: TDateTimeField
      FieldName = 'STIMEEDIT'
      Origin = '"SERVICES"."STIMEEDIT"'
    end
    object qServicesSISDELETE: TIntegerField
      FieldName = 'SISDELETE'
      Origin = '"SERVICES"."SISDELETE"'
    end
    object qServicesSTNAME: TIBStringField
      DisplayLabel = #1059#1089#1083#1091#1075#1072
      FieldName = 'STNAME'
      Origin = '"SERVICES_TYPE"."STNAME"'
      Size = 255
    end
    object qServicesSTTARIF: TIBBCDField
      DisplayLabel = #1058#1072#1088#1080#1092' '#1079#1072' '#1077#1076'.'
      FieldName = 'STTARIF'
      Origin = '"SERVICES_TYPE"."STTARIF"'
      DisplayFormat = '#,##0.00'
      Precision = 18
      Size = 2
    end
  end
  object quServices: TIBUpdateSQL
    RefreshSQL.Strings = (
      'null;')
    ModifySQL.Strings = (
      'update SERVICES'
      'set'
      '  SCID = :SCID,'
      '  SCOUNT = :SCOUNT,'
      '  SID = :SID,'
      '  SISDELETE = :SISDELETE,'
      '  SNOTE = :SNOTE,'
      '  STID = :STID,'
      '  STIMEEDIT = :STIMEEDIT,'
      '  STIMEENTER = :STIMEENTER,'
      '  SUSEREDIT = :SUSEREDIT,'
      '  SUSERENTER = :SUSERENTER'
      'where'
      '  SID = :OLD_SID')
    InsertSQL.Strings = (
      'insert into SERVICES'
      
        '  (SCID, SCOUNT, SID, SISDELETE, SNOTE, STID, STIMEEDIT, STIMEEN' +
        'TER, SUSEREDIT, '
      '   SUSERENTER)'
      'values'
      
        '  (:SCID, :SCOUNT, :SID, :SISDELETE, :SNOTE, :STID, :STIMEEDIT, ' +
        ':STIMEENTER, '
      '   :SUSEREDIT, :SUSERENTER)')
    DeleteSQL.Strings = (
      'update SERVICES'
      'set'
      '  SISDELETE = 1'
      'where'
      '  SID = :OLD_SID'
      '')
    Left = 1035
    Top = 608
  end
  object qResetGen: TIBQuery
    Database = DMInv.DBRead
    Transaction = DMInv.IBTransaction1
    SQL.Strings = (
      'ALTER SEQUENCE GEN_AGREEMENTS_DAY RESTART WITH 0')
    Left = 1059
    Top = 520
  end
end
